Test Data Generation for Killing SQL Mutants

نویسندگان

  • Devang Nemidas Vira
  • Devang Vira
چکیده

SQL queries are widely used in critical enterprise applications. Complex queries using mutlitable joins and aggregations are difficult to specifiy correctly. Programmers sometimes make mistakes in writing SQL queries, for example using a wrong join operator, a wrong relational operator in a where-clause predicate, etc. We call such variations of the query as ‘mutants’ of the original query. A mutant is killed by a dataset if the original query and the mutant return different results on the dataset. Hence, looking at the results of of a query on a dataset that kills a mutant one can determine if the original query was actually the intended query or the intended query may have been one of the mutants. The traditional way of testing whether SQL queries have been correctly specified include manually checking the results after executing the query against a dataset which itself is manually generated. However, a manually generated dataset may not include sufficient test cases for killing all known mutants of the query. In this report, we look at the problem of test data generation for a SQL query, to kill possible mutants. We present an approach for creation of small test datasets which would kill mutants of a specified query considering a limited class of mutations. These small datasets would enable a human to look at the result of the given query and its mutants to determine if the original query is indeed the intended query. The generated test cases satisfy all database constraints and are also realistic. This is ensured by extracting the test cases from an existing database. In case existing data is not sufficient, data is synthetically generated where required. We focus on a class of join/outer join mutants, which are a common cause of error in complex SQL queries. We present techniques to generate a test suite containing multiple test cases, and prove that under certain assumptions, the test suite is complete, i.e. it kills all non-equivalent mutations, in the class we consider. We also consider some common types of where-clause mutants.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Using Evolutionary Algorithms for Higher-Order Mutation Testing

Most software faults are complex higher-order mutants and their fixing needs more changes than first-order mutants. First-order mutants are created by inserting a single fault in the tested program. Higher-order mutants are created by injecting two or more faults in the tested program. Mutation testing has been developed to generate test inputs to kill the mutants of the tested program. Evoluti...

متن کامل

Efficient Mutation Testing using Whole Test Suite Generation

By seeding artificial faults (mutants), mutation testing can tell us how good existing tests are, and it can help to direct test generation efforts. However, mutation based test generation is hampered because there usually are simply too many mutants, and too many of these mutants are either trivially killed or equivalent. Any effort spent on test generation for equivalent mutants is per defini...

متن کامل

Dynamic Test Input Generation for Database Applications to Achieve High Mutation Score

Automatic generation of test cases for database applications has attracted researchers from both academia and industry. Typically in database application, the quality of test cases for the host language (e.g., Java) is evaluated on the basis of the number of lines, statements and blocks covered by the test cases, whereas, the quality of test cases for the embedded language (e.q., SQL) is evalua...

متن کامل

Test data generation for covering functionality of database applications

Applications for processing great volumes of data is a very widely used kind of software. In enterprise integration there are tasks of data integration. When solving these tasks, special tools supporting development and execution of applications implementing extract, transformation and load pattern are often used. From the point of view of functional testing, such applications have a specific p...

متن کامل

Mutating database queries

A set of mutation operators for SQL queries that retrieve information from a database is developed and tested against a set of queries drawn from the NIST SQL Conformance Test Suite. The mutation operators cover a wide spectrum of SQL features, including the handling of null values. Additional experiments are performed to explore whether the cost of executing mutants can be reduced using select...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2009